package ink.metoo.gude.config

import ink.metoo.gude.GudeServerApplication
import org.aspectj.lang.annotation.Aspect
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
import org.springframework.context.annotation.EnableAspectJAutoProxy

@Configuration
@ComponentScan(
    basePackages = [AspectConfig.ASPECT_SCAN_BASE_PACKAGE],
    includeFilters = [
        ComponentScan.Filter(classes = [Aspect::class])
    ]
)
@EnableAspectJAutoProxy
class AspectConfig {

    companion object {
        const val ASPECT_SCAN_BASE_PACKAGE = "${GudeServerApplication.BASE_PACKAGE}.aspect"
    }

}